package cn.zebra.dev.product.moudle.brand.service.impl;

import cn.zebra.dev.ibatis.plus.service.impl.ServiceImpl;
import cn.zebra.dev.ibatis.plus.utils.PageUtils;
import cn.zebra.dev.ibatis.plus.utils.Query;
import cn.zebra.dev.product.moudle.brand.dao.ProductBrandDao;
import cn.zebra.dev.product.moudle.brand.entity.ProductBrandEntity;
import cn.zebra.dev.product.moudle.brand.service.ProductBrandService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 
 *
 * @author runnable
 */
@Service
public class ProductBrandServiceImpl extends ServiceImpl<ProductBrandDao, ProductBrandEntity> implements ProductBrandService {

    @Override
    public PageUtils<ProductBrandEntity> findPage(Map<String, Object> params) {
        QueryWrapper<ProductBrandEntity> wrapper = new QueryWrapper<>();
        IPage<ProductBrandEntity> page = this.page(
                new Query<ProductBrandEntity>(params).getPage(),
                wrapper
        );

        return new PageUtils<>(page);
    }

}
